#include<iostream>
#include<memory>
using namespace std;
#include"UdpServer.hpp"
#include"Log.hpp"


void Usage(char* head)
{
    cout<<"Use Err"<<endl; 
    cout<<head<<"port"<<endl;
}

int main(int argc,char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
    }

    //string ip = argv[1];
    uint16_t port = stoi(argv[1]);

    std::unique_ptr<UdpServer> usvr(new UdpServer(port));

    usvr->Init();
    usvr->Start();

    return 0;
}